<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">

    <title>D-API Groovy</title>
   
	<link rel="stylesheet" href="./../lib/element-ui/index.css?buildversion=20210715">
	<link rel="stylesheet" href="./../lib/codemirror/codemirror.css">
	<link rel="stylesheet" href="./../lib/codemirror/addom/hint/show-hint.css">
	<link rel="stylesheet" href="./../lib/codemirror/theme/darcula.css">
    <link rel="stylesheet" href="./index.css?buildversion=20210715">
    <style type="text/css">

    </style>

</head>
<body>

	<div id="app">
		
		<el-tabs v-model="style.selectedIndex" @tab-click="onTabsChange" style="height: 100%;">
			<el-tab-pane label="　　主页　　" name="first" >
				<div class="app-main">
					<div v-for="(item, index) in formData.main.listData" v-if="null != item.code" :class="('api-item api-item-00' + (item.code.charCodeAt(0) % 5 + 1))">
						<div>
							<span v-if="12 < item.code.length">{{item.code.substring(0, 7)}}...{{item.code.substring(item.code.length - 5)}}</span>
							<span v-else>{{item.code}}</span>
							<span @click="onDelete(item.code)">&#xe640;</span>
						</div>
						<div>{{item.name}}</div>
						<div>
							<span>{{item.ts}}</span><span @click="onEdit(item.code)">修改&#xe919;</span>
						</div>
					</div>
					<div class="add-item" @click="onAdd()">&#xe634;</div>
				</div>
			</el-tab-pane>
			
			<el-tab-pane label="　编辑　" name="second" >
				<div class="app-edit">
		
					<div class="app-layer-left">
						<textarea name="script_content" id="script_content" style="display: none;"></textarea>
					</div>
		
					<div class="app-layer-right">
						<div><span>&#xe850;</span></div>
						<div>
							<el-form :model="formData.edit.fields" :rules="formData.edit.rules" ref="editFormData" label-width="100px" class="app-layer-right-form" status-icon>
								<el-form-item label="名称" prop="name">
									<el-input v-model="formData.edit.fields.name"></el-input>
								</el-form-item>
								<el-form-item label="URL" prop="url">
									<el-input type="textarea" v-model="formData.edit.fields.url" readonly></el-input>
								</el-form-item>
								<el-form-item label="说明">
									<el-input type="textarea" v-model="formData.edit.fields.description"></el-input>
								</el-form-item>
								<el-form-item label-width="0px" size="mini" class="app-layer-right-form-btn">
									<el-button type="primary" icon="el-icon-coin" @click="onSave" round>保存</el-button>
									<el-button type="danger" icon="el-icon-cpu" @click="onTest" round>测试</el-button>
									<el-button type="primary" icon="el-icon-position" @click="onRelease" round>发布</el-button>
								</el-form-item>
							</el-form>
						</div>
					</div>
				</div>
			</el-tab-pane>
		</el-tabs>
		
	</div>
	
</body>

<script type="text/javascript" src="./../lib/vue.js?buildversion=20210715"></script>
<script type="text/javascript" src="./../lib/element-ui/index.js?buildversion=20210715"></script>
<script type="text/javascript" src="./../lib/codemirror/codemirror.js"></script>
<script type="text/javascript" src="./../lib/codemirror/groovy.js"></script>
<script type="text/javascript" src="./../lib/codemirror/addom/hint/show-hint.js"></script>
<script type="text/javascript" src="./../lib/codemirror/addom/hint/anyword-hint.js"></script>
<script type="text/javascript" src="./../../lib/snail.common.js?buildversion=20210715"></script>
<script type="text/javascript" src="./../../lib/codemirror/groovy-hint.js?buildversion=20210715"></script>
<script type="text/javascript" src="./index.js?buildversion=20210715"></script>
<script type="text/javascript">
	
</script>

</html>
